package com.bjpowernode.web.controller;

import com.bjpowernode.api.vo.PlatformInfo;
import com.bjpowernode.web.views.ResultView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 盈利宝平台信息
 */
@CrossOrigin
@Api(tags = "盈利宝的平台信息")
@RestController
public class PlatInfoController extends BaseController {

    //获取三个基本信息，用户注册数，利率平衡值，累计成交金额
    @ApiOperation(value = "平台基本信息", notes = "用户注册数，利率平衡值，累计成交金额")
    @GetMapping("/v1/plat/info")
    public ResultView queryPlatInfo() {
        ResultView resultView = ResultView.SUCCESS();
        //去数据服务data-service查询数据，使用dubbo的远程调控
        PlatformInfo platformInfo = platformInfoService.queryIndexPlatInfo();
        resultView.setObject(platformInfo);
        return resultView;
    }
}
